﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySql.Data.MySqlClient;

namespace topicos2_oztech_drturin.Banco
{
    public class MedicoDB
    {
        ConexaoDB conx = new ConexaoDB();

        public Boolean ValidarLogin(String @cpf, String @senha) 
        {

            MySqlCommand cmd = new MySqlCommand();
            cmd = conx.ComandoSP("procValidarLoginMedico");
            cmd.Parameters.AddWithValue("_cpf", @cpf);
            cmd.Parameters.AddWithValue("_senha", @senha);            
            cmd.Connection.Open();
            MySqlDataReader mdr = cmd.ExecuteReader();
            Boolean flag = mdr.HasRows;
            cmd.Connection.Close();

            return flag;
        }
    }
}